<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>location对象</title>
</head>
<body>
    <button onclick="location.reload()">replace</button>
</body>
<script type="text/javascript">
    var url = location.href;
    console.log(url);

</script>
</html>